package com.wedo.mall.payment;

import android.os.Parcel;
import android.os.Parcelable;

import com.ipay.IpayResultDelegate;

import java.io.Serializable;

/**
 * iPay88回调
 * @author lxy
 * @time 2018/2/7  11:25
 */
public class IPay88Delegate implements IpayResultDelegate,Serializable, Parcelable {
    private static final long serialVersionUID = 2L;

    private transient Payment payment;
    public IPay88Delegate(Payment payment){
        this.payment = payment;
    }
    @Override
    public void onPaymentSucceeded(String s, String s1, String s2, String s3, String s4) {
        payment.onPaySuccessful();
    }

    @Override
    public void onPaymentFailed(String s, String s1, String s2, String s3, String s4) {

    }

    @Override
    public void onPaymentCanceled(String s, String s1, String s2, String s3, String s4) {

    }

    @Override
    public void onRequeryResult(String s, String s1, String s2, String s3) {

    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
    }

    protected IPay88Delegate(Parcel in) {
    }

    public static final Creator<IPay88Delegate> CREATOR = new Creator<IPay88Delegate>() {
        @Override
        public IPay88Delegate createFromParcel(Parcel source) {
            return new IPay88Delegate(source);
        }

        @Override
        public IPay88Delegate[] newArray(int size) {
            return new IPay88Delegate[size];
        }
    };
}
